-----------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\hanna\Dropbox\PC\Documents\PaperProjects\Paper-PKO and election-related violence\Submissions\BJPS
> \BJPS_R&R2\Replication Materials\replication_main.log
  log type:  text
 opened on:   2 Jun 2021, 13:13:13

. 
. 
. ** Load dataset of analysis
. use "replicationData.dta", clear

. 
end of do-file

. do "C:\Users\hanna\AppData\Local\Temp\STD00000000.tmp"

. ** Analyses: "Protecting the Vote? Peacekeeping Presence And The Risk Of Electoral Violence"
. ** Authors: Fjelde and Smidt
. ** Last modified: 26.02.2021
. 
. 
. 
. ** Preamble
. clear

. set more off

. version 13.0

. set max_memory .

. 
. ** IMPORTANT: Install packages
. *ssc install outreg2
. *ssc install cem
. *ssc install blindschemes
. *net install collin, from(https://stats.idre.ucla.edu/stat/stata/ado/analysis/) replace
. 
. ** IMPORTANT: Create two folders "Tables" and "Figures" in your working directory, where you saved the replication da
> ta
. ** IMPORTANT: Change working director path
. capture cd "/Users/hannefjelde/Dropbox/Collaborations/PKO and election-related violence\Submissions\BJPS\BJPS_R&R2\Fi
> les\Replication Materials"

. capture cd "C:\Users\hanna\Dropbox\PC\Documents\PaperProjects\Paper-PKO and election-related violence\Submissions\BJP
> S\BJPS_R&R2\Replication Materials"

. 
end of do-file

. do "C:\Users\hanna\AppData\Local\Temp\STD00000000.tmp"

. use "replicationData.dta", clear

. 
. ** Only keep countries and elections where are UN PKO is present
. ** Only keep years for which we have GEOPKO data
. keep if PKO_presNoPol==1
(32,371 observations deleted)

. keep if year>=1994 & year<=2017
(4,663 observations deleted)

. 
. 
. ** Drop period around election month that is longer than 13 months
. drop if collapsed_time_si_el > 6 & collapsed_time_to_el > 6 
(1,483 observations deleted)

. 
. ** Create a new election_id that is the same for consecutive elections
. egen election_id_new = group(collapsed_election_id_spell)

. 
. ** Make data panel: By admin units - election spells - months
. egen adminUnitElection_id = concat(unique_id   election_id_new)

. destring adminUnitElection_id, replace
adminUnitElection_id: all characters numeric; replaced as long

. 
. 
. ** Create treatment variable for matching
. capture gen un_military_base_du = un_military_base2

. capture replace un_military_base_du = 1 if un_military_base_du>0

. 
. 
. ** Create variables for violence trends
. ** Note: Positive means a previous DECREASE in violence; Negative means an INCREASE in electoral violence
. xtset adminUnitElection_id date
       panel variable:  adminUnitElection_id (unbalanced)
        time variable:  date, 1994m4 to 2017m12
                delta:  1 month

. capture drop veco_viol_trend*

. gen veco_viol_trend1 = (L1.veco_viol) - (L2.veco_viol+L3.veco_viol)/2
(8,251 missing values generated)

. gen veco_viol_trend2 = (L1.veco_viol+L2.veco_viol)/2 - (L3.veco_viol)
(8,251 missing values generated)

. 
. ** Create variables for robustness tests
. capture drop ecav_event_pre_du  

. gen ecav_event_pre_du = 0 if ecav_event_pre!=.
(4,531 missing values generated)

. replace ecav_event_pre_du = 1 if ecav_event_pre>0 & ecav_event_pre_du !=.
(63 real changes made)

. 
. capture drop ecav_event_post_du 

. gen ecav_event_post_du = 0 if ecav_event_post!=.
(4,531 missing values generated)

. replace ecav_event_post_du = 1 if ecav_event_post>0 & ecav_event_post_du !=.
(70 real changes made)

. 
. capture drop ecav_anti_gov_du

. gen ecav_anti_gov_du = ecav_anti_gov
(4,531 missing values generated)

. replace ecav_anti_gov_du = 1 if ecav_anti_gov>0 & ecav_anti_gov!= .
(27 real changes made)

. 
. capture drop ecav_pro_gov_du

. gen ecav_pro_gov_du = ecav_pro_gov
(4,531 missing values generated)

. replace ecav_pro_gov_du = 1 if ecav_pro_gov>0 & ecav_pro_gov!= .
(12 real changes made)

. 
. ** Add controls 
. global controls "viol_stateBased_preDep viol_stateBased_preDep_trend viol_OneSided_preDep viol_OneSided_preDep_trend 
> pop_gpw_sum un_military_base_du_spL"

. global controls_cem "viol_stateBased_preDep viol_stateBased_preDep_trend viol_OneSided_preDep viol_OneSided_preDep_tr
> end pop_gpw_sum roadDensity imr_mean bdist1 capdist un_military_base_du_spL" ///  un_military_base_du2Lag1_std
> 

. 
. ** Create sample of estimation with controls
. set seed 1234

. logit veco_viol_du un_military_base_du $controls_cem

Iteration 0:   log likelihood = -414.31316  
Iteration 1:   log likelihood =  -357.4643  
Iteration 2:   log likelihood = -338.46133  
Iteration 3:   log likelihood = -337.53514  
Iteration 4:   log likelihood = -337.53192  
Iteration 5:   log likelihood = -337.53192  

Logistic regression                             Number of obs     =     16,671
                                                LR chi2(11)       =     153.56
                                                Prob > chi2       =     0.0000
Log likelihood = -337.53192                     Pseudo R2         =     0.1853

----------------------------------------------------------------------------------------------
                veco_viol_du |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
         un_military_base_du |   1.282307   .3083725     4.16   0.000     .6779084    1.886706
      viol_stateBased_preDep |   .2264037   .0443869     5.10   0.000      .139407    .3134004
viol_stateBased_preDep_trend |  -.0870367   .0380604    -2.29   0.022    -.1616337   -.0124397
        viol_OneSided_preDep |   .0209547   .0210759     0.99   0.320    -.0203534    .0622627
  viol_OneSided_preDep_trend |  -.0115349   .0116487    -0.99   0.322    -.0343659     .011296
                 pop_gpw_sum |   5.63e-07   6.89e-08     8.17   0.000     4.28e-07    6.98e-07
                 roadDensity |   8.216341   3.654735     2.25   0.025     1.053192    15.37949
                    imr_mean |  -.0000624   .0006941    -0.09   0.928    -.0014228     .001298
                      bdist1 |    -.00306   .0016858    -1.82   0.069    -.0063641     .000244
                     capdist |   .0003247   .0002712     1.20   0.231    -.0002068    .0008563
     un_military_base_du_spL |  -.1317122   .2847731    -0.46   0.644    -.6898573    .4264329
                       _cons |  -6.764193   .9079714    -7.45   0.000    -8.543785   -4.984602
----------------------------------------------------------------------------------------------

. capture drop sample

. gen sample = 1 if e(sample)==1
(4,345 missing values generated)

. 
. ** Get number of events of electoral violence in DECO
. tab veco_viol_du if sample==1

veco_viol_d |
          u |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |     16,608       99.62       99.62
          1 |         63        0.38      100.00
------------+-----------------------------------
      Total |     16,671      100.00

. tab veco_viol if sample==1

  veco_viol |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |     16,608       99.62       99.62
          1 |         47        0.28       99.90
          2 |          9        0.05       99.96
          3 |          3        0.02       99.98
          5 |          2        0.01       99.99
         21 |          1        0.01       99.99
         25 |          1        0.01      100.00
------------+-----------------------------------
      Total |     16,671      100.00

. di 47 + (2*9) + (3*3) + (5*2) + 21 + 25
130

. sum veco_viol_du if sample==1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
veco_viol_du |     16,671     .003779    .0613593          0          1

. 
. ** Get number of events of electoral violence and contention in ECAV
. tab ecav_event_du if sample==1

ecav_event_ |
         du |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |     13,336       99.08       99.08
          1 |        124        0.92      100.00
------------+-----------------------------------
      Total |     13,460      100.00

. tab ecav_event if sample==1

 ecav_event |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |     13,336       99.08       99.08
          1 |         68        0.51       99.58
          2 |         27        0.20       99.78
          3 |          9        0.07       99.85
          4 |          2        0.01       99.87
          5 |          3        0.02       99.89
          6 |          4        0.03       99.92
          8 |          1        0.01       99.93
         10 |          2        0.01       99.94
         11 |          2        0.01       99.96
         13 |          2        0.01       99.97
         20 |          1        0.01       99.98
         22 |          1        0.01       99.99
         27 |          1        0.01       99.99
         28 |          1        0.01      100.00
------------+-----------------------------------
      Total |     13,460      100.00

. di 68 + (2*27) + (3*9) + (4*2) + (5*3) + (6*4) + (8*1) + (10*2) + (11*2) + (13*2) + 20 + 22 + 27 + 28
369

. 
. 
. ** Standardize control variables in the sample
. foreach var of varlist $controls_cem {
  2.         egen `var'_std = std(`var') if sample==1
  3. }
(4345 missing values generated)
(4345 missing values generated)
(4345 missing values generated)
(4345 missing values generated)
(4345 missing values generated)
(4345 missing values generated)
(4345 missing values generated)
(4345 missing values generated)
(4345 missing values generated)
(4345 missing values generated)

. 
. global controls_cem_std "viol_stateBased_preDep_std viol_stateBased_preDep_trend_std viol_OneSided_preDep_std viol_On
> eSided_preDep_trend_std pop_gpw_sum_std roadDensity_std imr_mean_std bdist1_std capdist_std un_military_base_du_spL_s
> td" ///un_military_base_du2Lag1_std 
> 

. ** Add labels
. do "replication_labels.do"

. ** Variable labels
. 
. capture label var PKO_presNoPol "Presence of UN political mission"

. capture label var collapsed_time_to_el "Time to election month" 

. capture label var collapsed_time_si_el "Time since election month"

. 
. capture label var collapsed_election_id_spell "Election id"

. 
. capture label var gwcode "Country code"

. capture label var country "Country name"

. capture label var name_1 "Name of the first-tier admin. unit"

. capture label var name_2 "Name of the second-tier admin. unit"

. capture label var year "Year"

. capture label var month "Month"

. capture label var date "Date"

. 
. capture label var un_military2 "UN military personnel"

. capture label var un_military_std "UN military personnel/1000 (std.)"

. 
. capture label var un_military_base2 "UN peacekeeping bases"

. capture label var un_military_base_du "UN peacekeeping presence"

. 
. capture label var un_military_base_du_spL "UN peacekeeping presence (spatial lag)"

. capture label var un_military_base_du_spL_std "UN peacekeeping bases  (spatial lag, std.)"

. 
. capture label var un_military_base_du2Lag1 "UN peacekeeping presence (1 month lag)"

. capture label var un_military_base_du2Lag1_std "UN peacekeeping presence (1 month lag, std.)"

. 
. capture label var viol_stateBased_preDep "State-based viol. (lag 24 months)"

. capture label var viol_stateBased_preDep_trend "State-based viol. trend"

. capture label var viol_OneSided_preDep "One-sided viol. (lag 24 months)"

. capture label var viol_OneSided_preDep_trend "One-sided viol. trend"

. capture label var pop_gpw_sum  "Population size"

. capture label var roadDensity  "Road density"

. capture label var imr_mean  "Infant mortality"

. capture label var bdist1 "Distance to border"

. capture label var capdist "Distance to capital"

. capture label var adminArea "Size of admin. area"

. 
. capture label var viol_stateBased_preDep_std "State-based viol. (lag 24 months) (std.)"

. capture label var viol_stateBased_preDep_trend_std "State-based viol. trend (std.)"

. capture label var viol_OneSided_preDep_std "One-sided viol. (lag 24 months) (std.)"

. capture label var viol_OneSided_preDep_trend_std "One-sided viol. trend (std.)"

. capture label var pop_gpw_sum_std "Population size (std.)"

. capture label var roadDensity_std "Road density (std.)"

. capture label var imr_mean_std "Infant mortality (std.)"

. capture label var bdist1_std "Distance to border (std.)"

. capture label var capdist_std "Distance to capital (std.)"

. 
. capture label var veco_viol_trend1 "Electoral violence trend 1"

. capture label var veco_viol_trend2 "Electoral violence trend 2"

. 
. capture label var ecav_trend1 "Electoral violence trend 1"

. capture label var ecav_trend2 "Electoral violence trend 2"

. 
. capture label var excluded_mean "Size of excluded groups"

. capture label var excluded_mean_std "Size of excluded group (std.)" 

. 
. capture label var PAR_pkoFatalities_yr "PKO fatalities in previous yr"

. capture label var PAR_pkoFatalities "Peacekeeping fatalities"

. 
. 
. capture label var ecav_event "ECAV electoral violence"

. capture label var ecav_event_pre "ECAV pre-electoral violence"

. capture label var ecav_event_post "ECAV post-electoral violence"

. capture label var ecav_pro_gov "ECAV pro-gov. electoral violence"

. capture label var ecav_anti_gov "ECAV anti-gov. electoral violence"

. capture label var ecav_event_pre_du "ECAV pre-electoral violence"

. capture label var ecav_event_post_du 

. capture label var ecav_anti_gov_du 

. capture label var ecav_pro_gov_du

. capture label var ecav_event_du 

. 
. capture label var veco_viol 

. capture label var veco_viol_du 

. capture label var veco_viol_pre_du 

. capture label var veco_viol_post_du 

. capture label var veco_pro_gov_viol2 

. capture label var veco_anti_gov_viol2 

. 
end of do-file

. 
. 
end of do-file

. do "C:\Users\hanna\AppData\Local\Temp\STD00000000.tmp"

. ** Variable labels
. 
. capture label var PKO_presNoPol "Presence of UN political mission"

. capture label var collapsed_time_to_el "Time to election month" 

. capture label var collapsed_time_si_el "Time since election month"

. 
. capture label var collapsed_election_id_spell "Election id"

. 
. capture label var gwcode "Country code"

. capture label var country "Country name"

. capture label var name_1 "Name of the first-tier admin. unit"

. capture label var name_2 "Name of the second-tier admin. unit"

. capture label var year "Year"

. capture label var month "Month"

. capture label var date "Date"

. 
. capture label var un_military2 "UN military personnel"

. capture label var un_military_std "UN military personnel/1000 (std.)"

. 
. capture label var un_military_base2 "UN peacekeeping bases"

. capture label var un_military_base_du "UN peacekeeping presence"

. 
. capture label var un_military_base_du_spL "UN peacekeeping presence (spatial lag)"

. capture label var un_military_base_du_spL_std "UN peacekeeping bases  (spatial lag, std.)"

. 
. capture label var un_military_base_du2Lag1 "UN peacekeeping presence (1 month lag)"

. capture label var un_military_base_du2Lag1_std "UN peacekeeping presence (1 month lag, std.)"

. 
. capture label var viol_stateBased_preDep "State-based viol. (lag 24 months)"

. capture label var viol_stateBased_preDep_trend "State-based viol. trend"

. capture label var viol_OneSided_preDep "One-sided viol. (lag 24 months)"

. capture label var viol_OneSided_preDep_trend "One-sided viol. trend"

. capture label var pop_gpw_sum  "Population size"

. capture label var roadDensity  "Road density"

. capture label var imr_mean  "Infant mortality"

. capture label var bdist1 "Distance to border"

. capture label var capdist "Distance to capital"

. capture label var adminArea "Size of admin. area"

. 
. capture label var viol_stateBased_preDep_std "State-based viol. (lag 24 months) (std.)"

. capture label var viol_stateBased_preDep_trend_std "State-based viol. trend (std.)"

. capture label var viol_OneSided_preDep_std "One-sided viol. (lag 24 months) (std.)"

. capture label var viol_OneSided_preDep_trend_std "One-sided viol. trend (std.)"

. capture label var pop_gpw_sum_std "Population size (std.)"

. capture label var roadDensity_std "Road density (std.)"

. capture label var imr_mean_std "Infant mortality (std.)"

. capture label var bdist1_std "Distance to border (std.)"

. capture label var capdist_std "Distance to capital (std.)"

. 
. capture label var veco_viol_trend1 "Electoral violence trend 1"

. capture label var veco_viol_trend2 "Electoral violence trend 2"

. 
. capture label var ecav_trend1 "Electoral violence trend 1"

. capture label var ecav_trend2 "Electoral violence trend 2"

. 
. capture label var excluded_mean "Size of excluded groups"

. capture label var excluded_mean_std "Size of excluded group (std.)" 

. 
. capture label var PAR_pkoFatalities_yr "PKO fatalities in previous yr"

. capture label var PAR_pkoFatalities "Peacekeeping fatalities"

. 
. 
. capture label var ecav_event "ECAV electoral violence"

. capture label var ecav_event_du "ECAV electoral violence du."

. capture label var ecav_event_pre "ECAV pre-electoral violence"

. capture label var ecav_event_post "ECAV post-electoral violence"

. capture label var ecav_pro_gov "ECAV pro-gov. electoral violence"

. capture label var ecav_anti_gov "ECAV anti-gov. electoral violence"

. capture label var ecav_event_pre_du "ECAV pre-electoral violence du."

. capture label var ecav_event_post_du "ECAV post-electoral violence du."

. capture label var ecav_anti_gov_du "ECAV anti-gov. electoral violence du."

. capture label var ecav_pro_gov_du "ECAV pro-gov. -electoral violence du."

. 
. capture label var veco_viol "VECO electoral violence"

. capture label var veco_viol_du "VECO electoral violence du."

. capture label var veco_viol_pre_du "VECO pre-electoral violence du."

. capture label var veco_viol_post_du "VECO post-electoral violence du."

. capture label var veco_pro_gov_viol2 "VECO pro-gov. electoral violence"

. capture label var veco_anti_gov_viol2 "VECO anti-gov. electoral violence" 

. 
end of do-file

. do "C:\Users\hanna\AppData\Local\Temp\STD00000000.tmp"

. ** Set to panel data
. xtset adminUnitElection_id
       panel variable:  adminUnitElection_id (unbalanced)

. 
. 
. 
. 
. ************************************************
. ** Check which elections are in the sample *****
. ************************************************
. tab date collapsed_election_id_spell if collapsed_election_id_spell!=. & country=="Burundi" // 1 election

           |  Election
           |     id
      Date |       273 |     Total
-----------+-----------+----------
    2005m1 |       133 |       133 
    2005m2 |       133 |       133 
    2005m3 |       133 |       133 
    2005m4 |       133 |       133 
    2005m5 |       133 |       133 
    2005m6 |       133 |       133 
    2005m7 |       133 |       133 
    2005m8 |       133 |       133 
    2005m9 |       133 |       133 
   2005m10 |       133 |       133 
   2005m11 |       133 |       133 
   2005m12 |       133 |       133 
    2006m1 |       133 |       133 
-----------+-----------+----------
     Total |     1,729 |     1,729 


. tab date collapsed_election_id_spell if collapsed_election_id_spell!=. & country=="Central African Republic" // 4 ele
> ctions

           |                 Election id
      Date |       216        217        221        224 |     Total
-----------+--------------------------------------------+----------
    1998m6 |        51          0          0          0 |        51 
    1998m7 |        51          0          0          0 |        51 
    1998m8 |        51          0          0          0 |        51 
    1998m9 |        51          0          0          0 |        51 
   1998m10 |        51          0          0          0 |        51 
   1998m11 |        51          0          0          0 |        51 
   1998m12 |        51          0          0          0 |        51 
    1999m1 |        51          0          0          0 |        51 
    1999m2 |        51          0          0          0 |        51 
    1999m3 |        51          0          0          0 |        51 
    1999m4 |        51          0          0          0 |        51 
    1999m5 |         0         51          0          0 |        51 
    1999m6 |         0         51          0          0 |        51 
    1999m7 |         0         51          0          0 |        51 
    1999m8 |         0         51          0          0 |        51 
    1999m9 |         0         51          0          0 |        51 
   1999m10 |         0         51          0          0 |        51 
   1999m11 |         0         51          0          0 |        51 
   1999m12 |         0         51          0          0 |        51 
    2000m1 |         0         51          0          0 |        51 
    2000m2 |         0         51          0          0 |        51 
    2010m9 |         0          0         51          0 |        51 
   2010m10 |         0          0         51          0 |        51 
   2010m11 |         0          0         51          0 |        51 
   2010m12 |         0          0         51          0 |        51 
    2011m1 |         0          0         51          0 |        51 
    2011m2 |         0          0         51          0 |        51 
    2011m3 |         0          0         51          0 |        51 
    2011m4 |         0          0         51          0 |        51 
    2011m5 |         0          0         51          0 |        51 
    2011m6 |         0          0         51          0 |        51 
    2011m7 |         0          0         51          0 |        51 
    2011m8 |         0          0         51          0 |        51 
    2011m9 |         0          0         51          0 |        51 
    2015m9 |         0          0          0         51 |        51 
   2015m10 |         0          0          0         51 |        51 
   2015m11 |         0          0          0         51 |        51 
   2015m12 |         0          0          0         51 |        51 
    2016m1 |         0          0          0         51 |        51 
    2016m2 |         0          0          0         51 |        51 
    2016m3 |         0          0          0         51 |        51 
    2016m4 |         0          0          0         51 |        51 
    2016m5 |         0          0          0         51 |        51 
    2016m6 |         0          0          0         51 |        51 
    2016m7 |         0          0          0         51 |        51 
    2016m8 |         0          0          0         51 |        51 
    2016m9 |         0          0          0         51 |        51 
-----------+--------------------------------------------+----------
     Total |       561        510        663        663 |     2,397 


. tab date collapsed_election_id_spell if collapsed_election_id_spell!=. & country=="Chad" // 1 elections but only five
>  observation as PKO left before end of electoral period

           |  Election
           |     id
      Date |       234 |     Total
-----------+-----------+----------
   2010m10 |        55 |        55 
   2010m11 |        55 |        55 
   2010m12 |        55 |        55 
    2011m1 |        55 |        55 
    2011m2 |        55 |        55 
    2011m3 |        55 |        55 
    2011m4 |        55 |        55 
    2011m5 |        55 |        55 
    2011m6 |        55 |        55 
    2011m7 |        55 |        55 
    2011m8 |        55 |        55 
    2011m9 |        55 |        55 
   2011m10 |        55 |        55 
-----------+-----------+----------
     Total |       715 |       715 


. tab date collapsed_election_id_spell if collapsed_election_id_spell!=. & country=="Côte d'Ivoire" // 4 elections

           |                 Election id
      Date |       127        128        129        130 |     Total
-----------+--------------------------------------------+----------
    2010m5 |        33          0          0          0 |        33 
    2010m6 |        33          0          0          0 |        33 
    2010m7 |        33          0          0          0 |        33 
    2010m8 |        33          0          0          0 |        33 
    2010m9 |        33          0          0          0 |        33 
   2010m10 |        33          0          0          0 |        33 
   2010m11 |        33          0          0          0 |        33 
   2010m12 |        33          0          0          0 |        33 
    2011m1 |        33          0          0          0 |        33 
    2011m2 |        33          0          0          0 |        33 
    2011m3 |        33          0          0          0 |        33 
    2011m4 |        33          0          0          0 |        33 
    2011m5 |        33          0          0          0 |        33 
    2011m6 |         0         33          0          0 |        33 
    2011m7 |         0         33          0          0 |        33 
    2011m8 |         0         33          0          0 |        33 
    2011m9 |         0         33          0          0 |        33 
   2011m10 |         0         33          0          0 |        33 
   2011m11 |         0         33          0          0 |        33 
   2011m12 |         0         33          0          0 |        33 
    2012m1 |         0         33          0          0 |        33 
    2012m2 |         0         33          0          0 |        33 
    2012m3 |         0         33          0          0 |        33 
    2012m4 |         0         33          0          0 |        33 
    2012m5 |         0         33          0          0 |        33 
    2012m6 |         0         33          0          0 |        33 
    2015m4 |         0          0         33          0 |        33 
    2015m5 |         0          0         33          0 |        33 
    2015m6 |         0          0         33          0 |        33 
    2015m7 |         0          0         33          0 |        33 
    2015m8 |         0          0         33          0 |        33 
    2015m9 |         0          0         33          0 |        33 
   2015m10 |         0          0         33          0 |        33 
   2015m11 |         0          0         33          0 |        33 
   2015m12 |         0          0         33          0 |        33 
    2016m1 |         0          0         33          0 |        33 
    2016m2 |         0          0         33          0 |        33 
    2016m3 |         0          0         33          0 |        33 
    2016m4 |         0          0         33          0 |        33 
    2016m6 |         0          0          0         33 |        33 
    2016m7 |         0          0          0         33 |        33 
    2016m8 |         0          0          0         33 |        33 
    2016m9 |         0          0          0         33 |        33 
   2016m10 |         0          0          0         33 |        33 
   2016m11 |         0          0          0         33 |        33 
   2016m12 |         0          0          0         33 |        33 
    2017m1 |         0          0          0         33 |        33 
    2017m2 |         0          0          0         33 |        33 
    2017m3 |         0          0          0         33 |        33 
    2017m4 |         0          0          0         33 |        33 
    2017m5 |         0          0          0         33 |        33 
    2017m6 |         0          0          0         33 |        33 
-----------+--------------------------------------------+----------
     Total |       429        429        429        429 |     1,716 


. tab date collapsed_election_id_spell if collapsed_election_id_spell!=. & country=="Democratic Republic of the Congo" 
> // 3 elections with longer pre-election period for 2006 (two-round election)

           |      Election id
      Date |       250        251 |     Total
-----------+----------------------+----------
    2006m4 |       240          0 |       240 
    2006m5 |       240          0 |       240 
    2006m6 |       240          0 |       240 
    2006m7 |       240          0 |       240 
    2006m8 |       240          0 |       240 
    2006m9 |       240          0 |       240 
   2006m10 |       240          0 |       240 
   2006m11 |       240          0 |       240 
   2006m12 |       240          0 |       240 
    2007m1 |       240          0 |       240 
    2007m2 |       240          0 |       240 
    2007m3 |       240          0 |       240 
    2007m4 |       240          0 |       240 
    2011m5 |         0        240 |       240 
    2011m6 |         0        240 |       240 
    2011m7 |         0        240 |       240 
    2011m8 |         0        240 |       240 
    2011m9 |         0        240 |       240 
   2011m10 |         0        240 |       240 
   2011m11 |         0        240 |       240 
   2011m12 |         0        240 |       240 
    2012m1 |         0        240 |       240 
    2012m2 |         0        240 |       240 
    2012m3 |         0        240 |       240 
    2012m4 |         0        240 |       240 
    2012m5 |         0        240 |       240 
-----------+----------------------+----------
     Total |     3,120      3,120 |     6,240 


. tab date collapsed_election_id_spell if collapsed_election_id_spell!=. & country=="Liberia" // 5 elections with short
> er election period in 1997

           |                      Election id
      Date |       151        153        155        156        158 |     Total
-----------+-------------------------------------------------------+----------
    1997m1 |        66          0          0          0          0 |        66 
    1997m2 |        66          0          0          0          0 |        66 
    1997m3 |        66          0          0          0          0 |        66 
    1997m4 |        66          0          0          0          0 |        66 
    1997m5 |        66          0          0          0          0 |        66 
    1997m6 |        66          0          0          0          0 |        66 
    1997m7 |        66          0          0          0          0 |        66 
    1997m8 |        66          0          0          0          0 |        66 
    1997m9 |        66          0          0          0          0 |        66 
    2005m5 |         0         66          0          0          0 |        66 
    2005m6 |         0         66          0          0          0 |        66 
    2005m7 |         0         66          0          0          0 |        66 
    2005m8 |         0         66          0          0          0 |        66 
    2005m9 |         0         66          0          0          0 |        66 
   2005m10 |         0         66          0          0          0 |        66 
   2005m11 |         0         66          0          0          0 |        66 
   2005m12 |         0         66          0          0          0 |        66 
    2006m1 |         0         66          0          0          0 |        66 
    2006m2 |         0         66          0          0          0 |        66 
    2006m3 |         0         66          0          0          0 |        66 
    2006m4 |         0         66          0          0          0 |        66 
    2006m5 |         0         66          0          0          0 |        66 
    2011m5 |         0          0         66          0          0 |        66 
    2011m6 |         0          0         66          0          0 |        66 
    2011m7 |         0          0         66          0          0 |        66 
    2011m8 |         0          0         66          0          0 |        66 
    2011m9 |         0          0         66          0          0 |        66 
   2011m10 |         0          0         66          0          0 |        66 
   2011m11 |         0          0         66          0          0 |        66 
   2011m12 |         0          0         66          0          0 |        66 
    2012m1 |         0          0         66          0          0 |        66 
    2012m2 |         0          0         66          0          0 |        66 
    2012m3 |         0          0         66          0          0 |        66 
    2012m4 |         0          0         66          0          0 |        66 
    2012m5 |         0          0         66          0          0 |        66 
    2014m6 |         0          0          0         66          0 |        66 
    2014m7 |         0          0          0         66          0 |        66 
    2014m8 |         0          0          0         66          0 |        66 
    2014m9 |         0          0          0         66          0 |        66 
   2014m10 |         0          0          0         66          0 |        66 
   2014m11 |         0          0          0         66          0 |        66 
   2014m12 |         0          0          0         66          0 |        66 
    2015m1 |         0          0          0         66          0 |        66 
    2015m2 |         0          0          0         66          0 |        66 
    2015m3 |         0          0          0         66          0 |        66 
    2015m4 |         0          0          0         66          0 |        66 
    2015m5 |         0          0          0         66          0 |        66 
    2015m6 |         0          0          0         66          0 |        66 
    2017m6 |         0          0          0          0         66 |        66 
    2017m7 |         0          0          0          0         66 |        66 
    2017m8 |         0          0          0          0         66 |        66 
    2017m9 |         0          0          0          0         66 |        66 
   2017m10 |         0          0          0          0         66 |        66 
   2017m11 |         0          0          0          0         66 |        66 
   2017m12 |         0          0          0          0         66 |        66 
-----------+-------------------------------------------------------+----------
     Total |       594        858        858        858        462 |     3,630 


. tab date collapsed_election_id_spell if collapsed_election_id_spell!=. & country=="Mali" // 2 elections

           |  Election
           |     id
      Date |        68 |     Total
-----------+-----------+----------
    2013m5 |        50 |        50 
    2013m6 |        50 |        50 
    2013m7 |        50 |        50 
    2013m8 |        50 |        50 
    2013m9 |        50 |        50 
   2013m10 |        50 |        50 
   2013m11 |        50 |        50 
   2013m12 |        50 |        50 
    2014m1 |        50 |        50 
    2014m2 |        50 |        50 
    2014m3 |        50 |        50 
    2014m4 |        50 |        50 
    2014m5 |        50 |        50 
-----------+-----------+----------
     Total |       650 |       650 


. tab date collapsed_election_id_spell if collapsed_election_id_spell!=. & country=="Mozambique" // 1 election with sho
> rter election period due to leaving of PKO

           |  Election
           |     id
      Date |       302 |     Total
-----------+-----------+----------
    1994m4 |       129 |       129 
    1994m5 |       129 |       129 
    1994m6 |       129 |       129 
    1994m7 |       129 |       129 
    1994m8 |       129 |       129 
    1994m9 |       129 |       129 
   1994m10 |       129 |       129 
   1994m11 |       129 |       129 
   1994m12 |       129 |       129 
    1995m1 |       129 |       129 
    1995m2 |       129 |       129 
    1995m3 |       129 |       129 
    1995m4 |       129 |       129 
-----------+-----------+----------
     Total |     1,677 |     1,677 


. tab date collapsed_election_id_spell if collapsed_election_id_spell!=. & country=="Sierra Leone" // 1 election

           |  Election
           |     id
      Date |       161 |     Total
-----------+-----------+----------
   2001m11 |        14 |        14 
   2001m12 |        14 |        14 
    2002m1 |        14 |        14 
    2002m2 |        14 |        14 
    2002m3 |        14 |        14 
    2002m4 |        14 |        14 
    2002m5 |        14 |        14 
    2002m6 |        14 |        14 
    2002m7 |        14 |        14 
    2002m8 |        14 |        14 
    2002m9 |        14 |        14 
   2002m10 |        14 |        14 
   2002m11 |        14 |        14 
-----------+-----------+----------
     Total |       182 |       182 


. tab date collapsed_election_id_spell if collapsed_election_id_spell!=. & country=="Sudan" // 2 elections 

           |      Election id
      Date |       423        424 |     Total
-----------+----------------------+----------
   2009m10 |        80          0 |        80 
   2009m11 |        80          0 |        80 
   2009m12 |        80          0 |        80 
    2010m1 |        80          0 |        80 
    2010m2 |        80          0 |        80 
    2010m3 |        80          0 |        80 
    2010m4 |        80          0 |        80 
    2010m5 |        80          0 |        80 
    2010m6 |        80          0 |        80 
    2010m7 |        80          0 |        80 
    2010m8 |        80          0 |        80 
    2010m9 |        80          0 |        80 
   2010m10 |        80          0 |        80 
   2014m10 |         0         80 |        80 
   2014m11 |         0         80 |        80 
   2014m12 |         0         80 |        80 
    2015m1 |         0         80 |        80 
    2015m2 |         0         80 |        80 
    2015m3 |         0         80 |        80 
    2015m4 |         0         80 |        80 
    2015m5 |         0         80 |        80 
    2015m6 |         0         80 |        80 
    2015m7 |         0         80 |        80 
    2015m8 |         0         80 |        80 
    2015m9 |         0         80 |        80 
   2015m10 |         0         80 |        80 
-----------+----------------------+----------
     Total |     1,040      1,040 |     2,080 


. 
. 
. 
. 
. 
. ****************************************
. ********** OLS Fixed effects ***********
. ****************************************
. xtreg veco_viol_du un_military_base2, fe vce(cl adminUnitElection_id)

Fixed-effects (within) regression               Number of obs     =     16,671
Group variable: adminUnitE~d                    Number of groups  =      1,302

R-sq:                                           Obs per group:
     within  = 0.0004                                         min =         10
     between = 0.0209                                         avg =       12.8
     overall = 0.0027                                         max =         13

                                                F(1,1301)         =       4.28
corr(u_i, Xb)  = -0.2534                        Prob > F          =     0.0388

                    (Std. Err. adjusted for 1,302 clusters in adminUnitElection_id)
-----------------------------------------------------------------------------------
                  |               Robust
     veco_viol_du |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
------------------+----------------------------------------------------------------
un_military_base2 |  -.0049252   .0023808    -2.07   0.039    -.0095957   -.0002546
            _cons |   .0048003   .0004937     9.72   0.000     .0038318    .0057688
------------------+----------------------------------------------------------------
          sigma_u |  .02627567
          sigma_e |  .05798536
              rho |  .17035767   (fraction of variance due to u_i)
-----------------------------------------------------------------------------------

. 
end of do-file

. do "C:\Users\hanna\AppData\Local\Temp\STD00000000.tmp"

. xtreg veco_viol_du un_military_base2 $controls, fe vce(cl adminUnitElection_id)

Fixed-effects (within) regression               Number of obs     =     16,671
Group variable: adminUnitE~d                    Number of groups  =      1,302

R-sq:                                           Obs per group:
     within  = 0.0062                                         min =         10
     between = 0.0521                                         avg =       12.8
     overall = 0.0048                                         max =         13

                                                F(7,1301)         =       2.00
corr(u_i, Xb)  = -0.5915                        Prob > F          =     0.0521

                               (Std. Err. adjusted for 1,302 clusters in adminUnitElection_id)
----------------------------------------------------------------------------------------------
                             |               Robust
                veco_viol_du |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
           un_military_base2 |  -.0052904   .0024365    -2.17   0.030    -.0100702   -.0005105
      viol_stateBased_preDep |  -.0073953   .0057042    -1.30   0.195    -.0185858    .0037953
viol_stateBased_preDep_trend |   .0061398   .0033077     1.86   0.064    -.0003493    .0126288
        viol_OneSided_preDep |   .0047468   .0018626     2.55   0.011     .0010929    .0084008
  viol_OneSided_preDep_trend |  -.0022452   .0009411    -2.39   0.017    -.0040914    -.000399
                 pop_gpw_sum |  -9.32e-09   6.17e-09    -1.51   0.131    -2.14e-08    2.78e-09
     un_military_base_du_spL |   .0005945   .0013799     0.43   0.667    -.0021125    .0033016
                       _cons |   .0132336   .0064856     2.04   0.042     .0005101     .025957
-----------------------------+----------------------------------------------------------------
                     sigma_u |  .03178735
                     sigma_e |  .05782674
                         rho |  .23205107   (fraction of variance due to u_i)
----------------------------------------------------------------------------------------------

. 
end of do-file

. do "C:\Users\hanna\AppData\Local\Temp\STD00000000.tmp"

. xtreg veco_viol_du un_military_base2 $controls i.date, fe vce(cl adminUnitElection_id)
note: 471.date omitted because of collinearity
note: 481.date omitted because of collinearity
note: 514.date omitted because of collinearity
note: 552.date omitted because of collinearity
note: 567.date omitted because of collinearity
note: 629.date omitted because of collinearity
note: 652.date omitted because of collinearity
note: 689.date omitted because of collinearity

Fixed-effects (within) regression               Number of obs     =     16,671
Group variable: adminUnitE~d                    Number of groups  =      1,302

R-sq:                                           Obs per group:
     within  = 0.0264                                         min =         10
     between = 0.0065                                         avg =       12.8
     overall = 0.0034                                         max =         13

                                                F(121,1301)       =          .
corr(u_i, Xb)  = -0.4069                        Prob > F          =          .

                               (Std. Err. adjusted for 1,302 clusters in adminUnitElection_id)
----------------------------------------------------------------------------------------------
                             |               Robust
                veco_viol_du |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
           un_military_base2 |  -.0052115   .0023763    -2.19   0.028    -.0098732   -.0005498
      viol_stateBased_preDep |  -.0072455   .0056209    -1.29   0.198    -.0182725    .0037814
viol_stateBased_preDep_trend |   .0060591   .0032677     1.85   0.064    -.0003513    .0124696
        viol_OneSided_preDep |   .0047434   .0018616     2.55   0.011     .0010913    .0083954
  viol_OneSided_preDep_trend |  -.0021718   .0009182    -2.37   0.018    -.0039732   -.0003704
                 pop_gpw_sum |  -1.39e-09   3.54e-09    -0.39   0.695    -8.34e-09    5.56e-09
     un_military_base_du_spL |    .001816   .0018005     1.01   0.313    -.0017161    .0053482
                             |
                        date |
                        412  |   1.06e-17   1.10e-10     0.00   1.000    -2.16e-10    2.16e-10
                        413  |  -.0000887   .0002052    -0.43   0.666    -.0004913     .000314
                        414  |   -.000051   .0001296    -0.39   0.694    -.0003051    .0002032
                        415  |  -.0000602   .0001292    -0.47   0.641    -.0003136    .0001932
                        416  |  -.0000203   .0001354    -0.15   0.881     -.000286    .0002453
                        417  |  -.0001023   .0003155    -0.32   0.746    -.0007213    .0005166
                        418  |   .0078772   .0079261     0.99   0.320    -.0076722    .0234266
                        419  |   .0001253   .0006381     0.20   0.844    -.0011266    .0013771
                        420  |   .0002312   .0007236     0.32   0.749    -.0011884    .0016508
                        421  |   .0002312   .0007236     0.32   0.749    -.0011884    .0016508
                        422  |   .0002312   .0007236     0.32   0.749    -.0011884    .0016508
                        423  |   .0002312   .0007236     0.32   0.749    -.0011884    .0016508
                        461  |  -1.11e-19   5.07e-11    -0.00   1.000    -9.94e-11    9.94e-11
                        462  |  -.0000666   .0001162    -0.57   0.567    -.0002946    .0001614
                        463  |  -.0000666   .0001162    -0.57   0.567    -.0002946    .0001614
                        464  |  -.0000666   .0001162    -0.57   0.567    -.0002946    .0001614
                        465  |  -.0000666   .0001162    -0.57   0.567    -.0002946    .0001614
                        466  |  -.0000666   .0001162    -0.57   0.567    -.0002946    .0001614
                        467  |  -.0000666   .0001162    -0.57   0.567    -.0002946    .0001614
                        468  |  -.0000666   .0001162    -0.57   0.567    -.0002946    .0001614
                        469  |  -.0000666   .0001162    -0.57   0.567    -.0002946    .0001614
                        470  |  -.0000666   .0001162    -0.57   0.567    -.0002946    .0001614
                        471  |          0  (omitted)
                        472  |   .0000775   .0001705     0.45   0.650    -.0002571     .000412
                        473  |   .0000775   .0001705     0.45   0.650    -.0002571     .000412
                        474  |   .0000349   .0001351     0.26   0.796    -.0002302       .0003
                        475  |   .0000349   .0001351     0.26   0.796    -.0002302       .0003
                        476  |   .0000349   .0001351     0.26   0.796    -.0002302       .0003
                        477  |   .0000349   .0001351     0.26   0.796    -.0002302       .0003
                        478  |   .0000349   .0001351     0.26   0.796    -.0002302       .0003
                        479  |   .0000349   .0001351     0.26   0.796    -.0002302       .0003
                        480  |   1.39e-19   4.76e-11     0.00   1.000    -9.34e-11    9.34e-11
                        481  |          0  (omitted)
                        502  |  -.0032575   .0063771    -0.51   0.610    -.0157681    .0092531
                        503  |  -.0033422   .0062267    -0.54   0.592    -.0155577    .0088732
                        504  |  -.0024477   .0059653    -0.41   0.682    -.0141504    .0092549
                        505  |  -.0018774   .0059422    -0.32   0.752    -.0135348      .00978
                        506  |   .0022174   .0055747     0.40   0.691    -.0087189    .0131537
                        507  |   .0018887   .0055081     0.34   0.732     -.008917    .0126943
                        508  |   .0008445    .005347     0.16   0.875    -.0096451    .0113342
                        509  |  -.0007595   .0028855    -0.26   0.792    -.0064202    .0049013
                        510  |  -.0001658   .0018179    -0.09   0.927    -.0037321    .0034005
                        511  |   .0000228   .0013285     0.02   0.986    -.0025835    .0026292
                        512  |   .0000512   .0006772     0.08   0.940    -.0012774    .0013798
                        513  |  -.0001837   .0001932    -0.95   0.342    -.0005628    .0001954
                        514  |          0  (omitted)
                        540  |   .0000468   .0006881     0.07   0.946    -.0013031    .0013966
                        541  |    -.00034    .000565    -0.60   0.547    -.0014484    .0007684
                        542  |  -.0005265    .000499    -1.06   0.292    -.0015055    .0004524
                        543  |  -.0006846   .0004571    -1.50   0.134    -.0015814    .0002121
                        544  |  -.0005662   .0004012    -1.41   0.158    -.0013533    .0002208
                        545  |    .022007   .0127735     1.72   0.085    -.0030519     .047066
                        546  |   .0071437   .0074346     0.96   0.337    -.0074413    .0217287
                        547  |  -.0002363   .0003473    -0.68   0.496    -.0009175     .000445
                        548  |   .0148319   .0105272     1.41   0.159    -.0058203    .0354841
                        549  |   .0074238   .0074843     0.99   0.321    -.0072588    .0221064
                        550  |   .0000389   .0003351     0.12   0.908    -.0006185    .0006962
                        551  |  -.0000462   .0001347    -0.34   0.732    -.0003104     .000218
                        552  |          0  (omitted)
                        555  |   .0001002   .0002384     0.42   0.674    -.0003675     .000568
                        556  |   .0126379   .0071988     1.76   0.079    -.0014847    .0267605
                        557  |   .0043307   .0041667     1.04   0.299    -.0038435     .012505
                        558  |   .0001041   .0001981     0.53   0.600    -.0002846    .0004927
                        559  |   .0124979   .0072123     1.73   0.083    -.0016512     .026647
                        560  |   .0000291   .0001617     0.18   0.857    -.0002882    .0003463
                        561  |   .0083531   .0059041     1.41   0.157    -.0032295    .0199357
                        562  |   .0082864    .005908     1.40   0.161    -.0033038    .0198766
                        563  |  -.0000613   .0001188    -0.52   0.606    -.0002944    .0001718
                        564  |   .0166743   .0082569     2.02   0.044      .000476    .0328726
                        565  |   .0000793   .0000616     1.29   0.198    -.0000415       .0002
                        566  |   .0000436   .0000346     1.26   0.208    -.0000243    .0001114
                        567  |          0  (omitted)
                        597  |  -.0204021   .0127888    -1.60   0.111    -.0454911    .0046869
                        598  |  -.0203246   .0127829    -1.59   0.112    -.0454019    .0047527
                        599  |  -.0204316   .0127769    -1.60   0.110    -.0454972    .0046339
                        600  |  -.0205007   .0127724    -1.61   0.109    -.0455574    .0045561
                        601  |  -.0209681   .0127737    -1.64   0.101    -.0460275    .0040912
                        602  |  -.0209134   .0127796    -1.64   0.102    -.0459843    .0041576
                        603  |  -.0224641   .0128086    -1.75   0.080    -.0475919    .0026637
                        604  |  -.0256282   .0143854    -1.78   0.075    -.0538493    .0025929
                        605  |  -.0253252   .0143864    -1.76   0.079    -.0535483    .0028979
                        606  |  -.0250305   .0143639    -1.74   0.082    -.0532094    .0031484
                        607  |  -.0250532   .0143639    -1.74   0.081    -.0532321    .0031257
                        608  |  -.0146759     .00969    -1.51   0.130    -.0336856    .0043338
                        609  |  -.0149009   .0096917    -1.54   0.124     -.033914    .0041121
                        610  |   .0033357   .0085907     0.39   0.698    -.0135173    .0201888
                        611  |   .0270814   .0170871     1.58   0.113    -.0064399    .0606027
                        612  |   .0148366   .0129964     1.14   0.254    -.0106597    .0403329
                        613  |   .0384899   .0201799     1.91   0.057    -.0010989    .0780787
                        614  |   .0382751   .0179989     2.13   0.034      .002965    .0735852
                        615  |   .0137915   .0108027     1.28   0.202    -.0074012    .0349841
                        616  |  -.0015784   .0050703    -0.31   0.756    -.0115251    .0083684
                        617  |   .0000656   .0021716     0.03   0.976    -.0041946    .0043257
                        618  |   .0032959   .0032152     1.03   0.306    -.0030116    .0096035
                        619  |    .006549   .0048068     1.36   0.173     -.002881     .015979
                        620  |   .0068698   .0041671     1.65   0.099    -.0013051    .0150447
                        621  |   .0032544   .0036032     0.90   0.367    -.0038144    .0103232
                        622  |   .0144428    .006684     2.16   0.031     .0013302    .0275554
                        623  |   .0071868   .0049773     1.44   0.149    -.0025776    .0169512
                        624  |  -.0001585    .002504    -0.06   0.950    -.0050709    .0047539
                        625  |  -.0002035   .0024672    -0.08   0.934    -.0050436    .0046367
                        626  |    .000185   .0024371     0.08   0.940    -.0045961     .004966
                        627  |  -.0002236   .0023192    -0.10   0.923    -.0047734    .0043262
                        628  |  -.0008361   .0022852    -0.37   0.715    -.0053193     .003647
                        629  |          0  (omitted)
                        640  |   .0033107   .0021486     1.54   0.124    -.0009044    .0075257
                        641  |   .0236742   .0196428     1.21   0.228    -.0148608    .0622092
                        642  |   .0237717   .0197681     1.20   0.229    -.0150093    .0625526
                        643  |   .0037717   .0022731     1.66   0.097    -.0006876    .0082309
                        644  |   .0038928   .0023095     1.69   0.092     -.000638    .0084236
                        645  |   .0041352   .0023868     1.73   0.083    -.0005472    .0088176
                        646  |   .0043458   .0024973     1.74   0.082    -.0005532    .0092449
                        647  |   .0045962   .0026071     1.76   0.078    -.0005184    .0097109
                        648  |   .0047174   .0026568     1.78   0.076    -.0004947    .0099294
                        649  |   .0025979   .0018882     1.38   0.169    -.0011064    .0063023
                        650  |   .0011918   .0008665     1.38   0.169     -.000508    .0028916
                        651  |   .0000643   .0002358     0.27   0.785    -.0003982    .0005269
                        652  |          0  (omitted)
                        657  |  -.0073842   .0044513    -1.66   0.097    -.0161167    .0013482
                        658  |  -.0073827   .0044426    -1.66   0.097    -.0160982    .0013327
                        659  |  -.0080256   .0043879    -1.83   0.068    -.0166336    .0005825
                        660  |  -.0074502   .0041768    -1.78   0.075    -.0156443    .0007439
                        661  |   .0046883   .0116703     0.40   0.688    -.0182064     .027583
                        662  |   .0541133   .0269904     2.00   0.045     .0011637    .1070628
                        663  |    .010074   .0124013     0.81   0.417    -.0142547    .0344027
                        664  |  -.0073178   .0034112    -2.15   0.032    -.0140098   -.0006258
                        665  |  -.0073461   .0034235    -2.15   0.032    -.0140624   -.0006299
                        666  |  -.0070453   .0033244    -2.12   0.034     -.013567   -.0005236
                        667  |  -.0072988   .0033833    -2.16   0.031    -.0139361   -.0006615
                        668  |  -.0083246   .0040428    -2.06   0.040    -.0162558   -.0003935
                        669  |   -.008262   .0039543    -2.09   0.037    -.0160195   -.0005044
                        670  |   -.007468    .004464    -1.67   0.095    -.0162254    .0012894
                        671  |    .004118   .0093438     0.44   0.659    -.0142127    .0224486
                        672  |  -.0070935   .0040976    -1.73   0.084    -.0151321    .0009451
                        673  |  -.0055867   .0031417    -1.78   0.076    -.0117502    .0005767
                        674  |  -.0043238   .0025083    -1.72   0.085    -.0092445    .0005969
                        675  |  -.0041342   .0021652    -1.91   0.056    -.0083819    .0001135
                        676  |  -.0014949   .0007929    -1.89   0.060    -.0030505    .0000606
                        677  |  -.0006559   .0003562    -1.84   0.066    -.0013547    .0000429
                        678  |  -.0000154   .0001206    -0.13   0.898    -.0002521    .0002213
                        679  |   .0003329   .0001976     1.69   0.092    -.0000547    .0007205
                        680  |   .0003868     .00021     1.84   0.066    -.0000251    .0007988
                        681  |   .0000121   .0000236     0.51   0.608    -.0000342    .0000585
                        682  |   .0000121   .0000236     0.51   0.608    -.0000342    .0000585
                        683  |   .0000121   .0000236     0.51   0.608    -.0000342    .0000585
                        684  |    .000072   .0010274     0.07   0.944    -.0019435    .0020875
                        685  |   .0000121   .0000236     0.51   0.608    -.0000342    .0000585
                        686  |   .0000121   .0000236     0.51   0.608    -.0000342    .0000585
                        687  |  -8.11e-17   6.46e-10    -0.00   1.000    -1.27e-09    1.27e-09
                        688  |  -8.11e-17   6.55e-10    -0.00   1.000    -1.29e-09    1.29e-09
                        689  |          0  (omitted)
                             |
                       _cons |    .004312   .0038046     1.13   0.257    -.0031518    .0117759
-----------------------------+----------------------------------------------------------------
                     sigma_u |  .02943444
                     sigma_e |  .05750579
                         rho |  .20760208   (fraction of variance due to u_i)
----------------------------------------------------------------------------------------------

. 
end of do-file

. do "C:\Users\hanna\AppData\Local\Temp\STD00000000.tmp"

. xtreg veco_viol_du un_military_base2 $controls veco_viol_trend1 if veco_viol_trend1!=., fe vce(cl adminUnitElection_i
> d)

Fixed-effects (within) regression               Number of obs     =     12,765
Group variable: adminUnitE~d                    Number of groups  =      1,302

R-sq:                                           Obs per group:
     within  = 0.0376                                         min =          7
     between = 0.0613                                         avg =        9.8
     overall = 0.0020                                         max =         10

                                                F(8,1301)         =       5.28
corr(u_i, Xb)  = -0.7145                        Prob > F          =     0.0000

                               (Std. Err. adjusted for 1,302 clusters in adminUnitElection_id)
----------------------------------------------------------------------------------------------
                             |               Robust
                veco_viol_du |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
           un_military_base2 |  -.0082803   .0032216    -2.57   0.010    -.0146004   -.0019601
      viol_stateBased_preDep |  -.0173913   .0080235    -2.17   0.030    -.0331317   -.0016509
viol_stateBased_preDep_trend |   .0141369   .0052442     2.70   0.007     .0038488    .0244249
        viol_OneSided_preDep |   .0051253   .0034043     1.51   0.132    -.0015532    .0118038
  viol_OneSided_preDep_trend |  -.0021742   .0013561    -1.60   0.109    -.0048346    .0004862
                 pop_gpw_sum |  -1.97e-08   1.41e-08    -1.39   0.164    -4.74e-08    8.07e-09
     un_military_base_du_spL |  -.0001888   .0019977    -0.09   0.925    -.0041078    .0037302
            veco_viol_trend1 |    .033481   .0056824     5.89   0.000     .0223335    .0446286
                       _cons |   .0265446   .0142994     1.86   0.064    -.0015077     .054597
-----------------------------+----------------------------------------------------------------
                     sigma_u |  .04624726
                     sigma_e |  .05989652
                         rho |  .37349965   (fraction of variance due to u_i)
----------------------------------------------------------------------------------------------

. 
end of do-file

. do "C:\Users\hanna\AppData\Local\Temp\STD00000000.tmp"

. xtreg veco_viol_du un_military_base2 $controls veco_viol_trend2 if veco_viol_trend2!=., fe vce(cl adminUnitElection_i
> d)

Fixed-effects (within) regression               Number of obs     =     12,765
Group variable: adminUnitE~d                    Number of groups  =      1,302

R-sq:                                           Obs per group:
     within  = 0.0289                                         min =          7
     between = 0.0696                                         avg =        9.8
     overall = 0.0052                                         max =         10

                                                F(8,1301)         =       4.59
corr(u_i, Xb)  = -0.7586                        Prob > F          =     0.0000

                               (Std. Err. adjusted for 1,302 clusters in adminUnitElection_id)
----------------------------------------------------------------------------------------------
                             |               Robust
                veco_viol_du |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
           un_military_base2 |    -.00867   .0033083    -2.62   0.009    -.0151602   -.0021799
      viol_stateBased_preDep |  -.0179539   .0077533    -2.32   0.021    -.0331642   -.0027436
viol_stateBased_preDep_trend |    .014462   .0049595     2.92   0.004     .0047326    .0241915
        viol_OneSided_preDep |   .0021892    .003972     0.55   0.582    -.0056031    .0099814
  viol_OneSided_preDep_trend |  -.0003522   .0017206    -0.20   0.838    -.0037277    .0030233
                 pop_gpw_sum |  -2.20e-08   1.47e-08    -1.49   0.135    -5.09e-08    6.89e-09
     un_military_base_du_spL |  -.0007007   .0020386    -0.34   0.731       -.0047    .0032986
            veco_viol_trend2 |    .034855   .0076272     4.57   0.000      .019892    .0498181
                       _cons |   .0302032   .0148905     2.03   0.043     .0009912    .0594153
-----------------------------+----------------------------------------------------------------
                     sigma_u |  .04866882
                     sigma_e |  .06016484
                         rho |  .39553626   (fraction of variance due to u_i)
----------------------------------------------------------------------------------------------

. 
end of do-file

